package thread;

class MyThread extends Thread {
    @Override
    public void run() {
        // run方法中的逻辑,是在新创建出来的线程中,被执行的代码
        System.out.println("hello thread");
    }
}
public class TestDemo1 {
    public static void main(String[] args) {
        Thread t1 = new MyThread();
        t1.start();
    }
}
